import React, {memo} from 'react';

import "./index.css";

export default memo(function Title(props) {
  const {imgClass,imgClassPic, name, btn, btnAction, imgAction,imgActionSave, btnLeft, btnLeftAction,btnLeftSample,btnLeftSampleAction} = props;
  return (
    <header className="componentTitle">
      {btnLeft && <div className="componentTitleBtnLeft" onClick={btnLeftAction}>{btnLeft}</div>}
      {imgClass && <div className={`componentTitleImg ${imgClass}`} onClick={imgAction}/>}
      {imgClassPic && <div className={`componentTitleImg ${imgClassPic}`} onClick={imgActionSave}/>}
      <div className="componentTitleName">{name}</div>
      {btn && <div className="componentTitleBtn" onClick={btnAction}>{btn}</div>}
      {btnLeftSample && <div className="componentTitleSample" onClick={btnLeftSampleAction}>{btnLeftSample}</div>}
    </header>
  );
});